<template>
<div style="background-color: rgb(250, 250, 250);height:100%;widyh:100%">
  <div class='box' hideOnSinglePage>
    <img src="../../src/img/神里凌人.jpg" alt="">
    <a-table :columns="columns" :data-source="data" showHeader=flase; hideOnSinglePage>
    <a slot="" slot-scope="text" hideOnSinglePage>{{ text }}</a>
  </a-table>
  <div class="card">
    <span>线上简历：</span><router-link to="/user/PerDetail">简历</router-link>
    <div class="position">
      <span>找工作:</span><router-link to="">工作</router-link>
    </div>
    <p>应邀面试次数：</p>
    <p>接受面试次数：</p>
    <p>拒绝面试次数：</p>
  </div>
  </div>
  </div>
</template>

<script>
const columns = [
  {
    title: '',
    dataIndex: 'name',
    key: 'name',
    scopedSlots: { customRender: 'name' },
  },
  {
    title: '年龄',
    dataIndex: 'age',
    key: 'age',
    width: 80,
  },
  {
    title: '地址',
    dataIndex: 'address',
    key: 'address 1',
    ellipsis: true,
  },
  {
    title: '学历',
    dataIndex: 'degree',
    key: 'address 2',
    ellipsis: true,
  },
  {
    title: '注册时间',
    dataIndex: 'registerTime',
    key: 'address 4',
    ellipsis: true,
  },
  {
    title: '最近登录时间',
    dataIndex: 'recentLoginTime',
    key: 'address 3',
    ellipsis: true,
  },
  
];

const data=[];
// const data = [
//   {
//     key: '1',
//     name: 'John Brown',
//     age: 32,
//     address: 'New York No. 1 Lake Park, New York No. 1 Lake Park',
//     tags: ['nice', 'developer'],
//   }
// ];
export default {
  data(){
    return {
      data,
      columns,
    }
  },
  mounted(){
    this.$axios
      .post("/getuserinfo", {})
      .then((res) => {
        console.log(res.data.data[0]);
        // 获取数据
        data.push({
          key:'1',
          name:res.data.data[1].uName,
          age:res.data.data[1].age,
          address:res.data.data[1].address,
          degree:res.data.data[1].degree,
          recentLoginTime:res.data.data[1].recentLoginTime,
          registerTime:res.data.data[1].registerTime,
        })
      })
      .catch((err) => {
        console.error(err);
      });
  },
  methods:{
    submit(){
      console.log(123);
    }
  }
}
</script>

<style>


.box img{
  height: 60px;
  /* display: inline-block; */
  border-radius: 50%;
  width: 60px;
  position: absolute;
  left: 250px;
  top: 80px;
  z-index: 999;
}

.card{
  padding-left: 20px;
}
span{
  margin-right: 8px;
  margin-bottom: 10px;
  display: inline-block;
}
</style>